package com.nsu.tly.service;

import com.nsu.tly.dao.GoodsMapper;
import com.nsu.tly.entity.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description:
 * @Author: Elder Tang
 * @Date: 2021/7/22 19:55
 */
@Service
public class GoodsServiceImpl implements GoodsService{

    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public int addGoods(Goods goods) {
        return  goodsMapper.insertSelective(goods);
    }

    @Override
    public List<Goods> showGoods() {
        return goodsMapper.selectAllGoods();
    }
}
